<?php

namespace app\api\listener;

use app\common\model\UserProductView;

class ProductView
{
    public function handle($info)
    {
        $data = [
            'uid' => $info['uid'],
            'pid' => $info['pid'],
            'create_date' => date("Y-m-d")
        ];
        if(!UserProductView::where($data)->find()){
            UserProductView::create($data);
        }
    }
}